package main

import (
	"go_web/mapper"

	"github.com/gin-gonic/gin"
)

// 程序的入口
func main() {

	r := gin.Default()

	//路由组
	luyou := r.Group("/hls")

	{
		luyou.GET("/ping", func(ctx *gin.Context) {
			ctx.JSON(200, gin.H{
				"xinxi": "成功",
			})
		})

		luyou.PDST("/create", mapper.Asset{}.Create)
		luyou.PDST("/query", mapper.Asset{}.Query)
		luyou.PDST("/transfer", mapper.Asset{}.Transfer)

	}

	//运行端口
	r.Run(":9000")
}
